<template>
  <div>

    <h1>{{ blogInfo.articleTitle }}</h1>
    <h1 v-html="blogInfo.articleContent"></h1>
  </div>
</template>

<script>

export default {
  name: "BlogInfo",
  created() {
    this.params = this.$route.query
    this.getBlogInfo()
  },
  data() {
    return {
      params: {},
      blogInfo: {
        articleClassify: '',
        articleCollect: '',
        articleContent: '',
        articleCover: '',
        articleId: '',
        articleLike: '',
        articleRanking: 0,
        articleTags: '',
        articleTitle: '',
        articleUnlike: '',
        articleUsername: '',
        createTime: '',
        updateTime: '',
      }
    }
  },
  methods: {
    /**
     * 获取根据传过来的id查询的文章内容
     */
    getBlogInfo() {
      this.$mr.getBlogInfoByTitle(this.params.title, this.params.username, this.params.id).then((data) => {

        this.blogInfo = data.data
      })
    }
  }
}
</script>

<style scoped>

</style>
